package com.ky.pro.java.dt.app.proxy;

import com.ky.pro.java.dt.app.proxy.dto.KitchenProcess;
import com.ky.pro.java.dt.common.web.ResultBean;
import com.sun.istack.internal.NotNull;
import org.dromara.hmily.annotation.Hmily;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "hmily-demo-kitchen-service", path = "/kitchen")
public interface KitchenProcessProxy {

    @Hmily
    @PutMapping("/orderNo/{orderNo}/status/{status}")
    ResultBean<String> updateKitchenProcessStatus(@PathVariable("orderNo") @NotNull Long orderNo,
                                                  @PathVariable("status") @NotNull Integer status);

    @PostMapping("/")
    ResultBean<String> createKitchenProcess(@RequestBody KitchenProcess kitchenProcess);

    @Hmily
    @GetMapping("/existence/orderNo/{orderNo}")
    ResultBean<Boolean> checkExistence(@PathVariable("orderNo") Long orderNo);

}
